/*
 * Copyright (c) 2006, 2022, webrx.cn All rights reserved.
 *
 */
package chat02;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

/**
 * <p>Project: jse2204 - Client
 * <p>Powered by webrx On 2022-09-29 15:32:14
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Client {
    public static void main(String[] args) {
        try{
            Socket c = new Socket("localhost",6578);
            PrintWriter writer = new PrintWriter(c.getOutputStream());
            BufferedReader reader = new BufferedReader(new InputStreamReader(c.getInputStream()));
            ChatUtil cu = new ChatUtil(writer,reader,"客户");
            new Thread(cu::a).start();
            new Thread(cu::b).start();
        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
